package com.eastfair.visitor.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.visitor.dto.DepartmentDTO;
import com.eastfair.visitor.dto.DepartmentPageQuery;
import com.eastfair.visitor.dto.DepartmentSaveDTO;
import com.eastfair.visitor.dto.DepartmentUpdateDTO;
import com.eastfair.visitor.entity.Department;
import com.eastfair.visitor.vo.DepartmentVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 部门管理
 * </p>
 *
 * @author lyw
 * @date 2022-11-18
 */
public interface DepartmentService extends SuperService<Department> {
    /**
     * do转vo
     *
     * @param model
     */
    DepartmentVO doToVo(Department model);

    /**
     * do转vo
     *
     * @param modelList
     */
    List<DepartmentVO> doToVos(List<Department> modelList);


    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<Department> list(DepartmentDTO modelDTO, List<Long> ids);

    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<Department> listOfCache(DepartmentDTO modelDTO, List<Long> ids);

    /**
     * 查询部门列表分页
     * @param params
     * @return
     */
    IPage<DepartmentVO> queryDepartmentList(PageParams<DepartmentPageQuery> params);

    /**
     * 查询部门列表
     * @return
     */
    List<DepartmentVO> getDepartmentList();

    /**
     * 添加部门
     * @param departmentSaveDTO
     * @return
     */
    Boolean saveDepartmentInfo(DepartmentSaveDTO departmentSaveDTO);

    /**
     * 修改部门
     * @param departmentUpdateDTO
     * @return
     */
    Boolean updateDepartmentInfo(DepartmentUpdateDTO departmentUpdateDTO);

    /**
     * 逻辑删除部门
     * @param departmentUpdateDTO
     * @return
     */
    Boolean delDepartmentById(DepartmentUpdateDTO departmentUpdateDTO);
}
